package com.example.feigndemo.feign;

import com.example.feigndemo.feignFall.UserFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author 文希
 * @create 2019-05-26 1:11
 */
//@FeignClient(name = "user-service")//该接口，以后用来调用的user-service
@FeignClient(name = "teacher-service", fallback = UserFeignFallBack.class) // 将备胎配置进去
public interface UserFeign {

    @GetMapping("/info") //远程调用name+value放在一起，user-service/info
    String info();
}
